GDK W32: Don't let TEMP surfaces cause zorder side-effects
authorРуслан Ижбулатов <lrn1986@gmail.com>
Wed, 20 Sep 2017 17:21:44 +0000 (17:21 +0000)
committerРуслан Ижбулатов <lrn1986@gmail.com>
Sun, 17 Jun 2018 10:59:47 +0000 (10:59 +0000)
Pass SWP_NOOWNERZORDER when rising TEMP surfaces to the top. This ensures that
they don't drag anything else to the top with them. The use-case for this is
a tooltip appearing for a non-foreground surface, causing said surface to rise
above other surfaces, some of which maybe foreground at the moment.

https://bugzilla.gnome.org/show_bug.cgi?id=784766

gdk/win32/gdksurface-win32.c

index 8b3cfa15bd1aa97f04d9117fe44b4ab65d55812f..4b5adb4924f524edeae41ba455805d1b95c52d07 100644 (file)
@@ -1458,7 +1458,7 @@ gdk_win32_surface_raise (GdkSurface *window)
       if (GDK_SURFACE_TYPE (window) == GDK_SURFACE_TEMP)
         API_CALL (SetWindowPos, (GDK_SURFACE_HWND (window), HWND_TOPMOST,
                                 0, 0, 0, 0,
-                                SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE));
+                                SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | SWP_NOOWNERZORDER));
       else if (window->accept_focus)
         /* Do not wrap this in an API_CALL macro as SetForegroundWindow might
          * fail when for example dragging a window belonging to a different